/* Create default info store */
priv->cssnode = gtk_css_node_new ();
gtk_css_node_declaration_set_state (&priv->cssnode->decl, GTK_STATE_FLAG_DIR_LTR);
- priv->cssnode->values = g_object_ref (gtk_css_static_style_get_default ());
priv->property_cache = g_array_new (FALSE, FALSE, sizeof (PropertyValue));
if (cssnode->values)
return cssnode->values;
- g_assert (gtk_style_context_is_saved (context));
-
values = g_hash_table_lookup (priv->style_values, cssnode->decl);
if (values)
{
priv->pending_changes = 0;
gtk_style_context_set_invalid (context, FALSE);
- current = g_object_ref (cssnode->values);
+ current = cssnode->values;
+ if (current == NULL)
+ current = gtk_css_static_style_get_default ();
+ g_object_ref (current);
/* Try to avoid invalidating if we can */
if (gtk_style_context_style_needs_full_revalidate (current, change))